package com.jappyframework;

import java.util.Arrays;
import java.util.Collection;
import java.util.Set;

import com.jappyframework.api.WebService;
import com.sun.mirror.apt.AnnotationProcessor;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
import com.sun.mirror.apt.AnnotationProcessorFactory;
import com.sun.mirror.declaration.AnnotationTypeDeclaration;

/**
 * Factory for processing
 * @Recipe and @Potion.
 * 
 * Two options are needed 
 *  -Awebxmlpath  [~voodooweb/WebContent/WEB-INF/web.xml ]
 * -Asourcexmlpath  [ ~voodoo/conf/web.xml]
 * 
 * @author harsh
 *
 */
public class JappyAnnotationProcessorFactory implements AnnotationProcessorFactory {

	public AnnotationProcessor getProcessorFor(
			Set<AnnotationTypeDeclaration> arg0,
			AnnotationProcessorEnvironment env) {
		return new JappyAnnotationProcessor(env);
	}

	public Collection<String> supportedAnnotationTypes() {
		return Arrays.asList(WebService.class.getName());
	}

	public Collection<String> supportedOptions() {
		return Arrays.asList("-Awebxmlpath", "-Asourcexmlpath");
	}
}
